home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-08-15 | 2.7 KB | 91 lines | [TEXT/PJMM] |
- { File: DartIntf.p}
-
- { Written by: Ken McLeod}
-
- { Copyright: © 1987-1994 by Apple Computer, Inc.}
- { All rights reserved.}
-
- { Version: 1.5.3}
- { Created: Wednesday, August 3, 1994 16:00}
-
- { Changed: srcCmp and srcType fields changed to Byte to make life easier for all. [JJQ] & [PNL] }
-
- unit DartIntf;
-
- interface
-
- const
- (*----------------------------------------------------------------------}
- { disk identifiers}
- {----------------------------------------------------------------------*)
-
- kMacDisk = 1;
- kLisaDisk = 2;
- kAppleIIDisk = 3;
-
- kMacHiDDisk = 16;
- kMSDOSLowDDisk = 17;
- kMSDOSHiDDisk = 18;
-
- (*----------------------------------------------------------------------}
- { file types}
- {----------------------------------------------------------------------*)
-
- kDartCreator = 'DART';
- kOldFileType = 'DMdf';
- kDartPrefsType = 'DMd0';
- kMac400KType = 'DMd1';
- kLisa400KType = 'DMd2';
- kMac800KType = 'DMd3';
- kApple800KType = 'DMd4';
- kMSDOS720KType = 'DMd5';
- kMac1440KType = 'DMd6';
- kMSDOS1440KType = 'DMd7';
- kDiskCopyType = 'dImg';
-
- (*----------------------------------------------------------------------}
- { compression identifiers}
- {----------------------------------------------------------------------*)
-
- kRLECompress = 0; { "fast" algorithm }
- kLZHCompress = 1; { "best" algorithm }
- kNoCompress = 2; { not compressed }
-
- (*----------------------------------------------------------------------}
- { data structures}
- {----------------------------------------------------------------------*)
- type
-
- SrcInfoRec = packed record
- srcCmp: Byte; { compression identifier }
- srcType: Byte; { disk type identifier (Lisa, Mac, etc.) }
- srcSize: INTEGER; { size of source disk in Kb (e.g. 800=800K) }
- bLength: array[1..40] of INTEGER; { array of block lengths }
- { variable-length compressed disk data follows... }
- end;
-
- HDSrcInfoRec = packed record
- srcCmp: Byte; { compression identifier }
- srcType: Byte; { disk type identifier (Lisa, Mac, etc.) }
- srcSize: INTEGER; { size of source disk in Kb (e.g. 800=800K) }
- bLength: array[1..72] of INTEGER; { array of block lengths }
- { variable-length compressed disk data follows... }
- end;
-
- const
- DDBLOCKSIZE = 20960; { size of an uncompressed block, in bytes }
-
- type
- DiskData = packed array[1..DDBLOCKSIZE] of CHAR;
- DDPtr = ^DiskData;
-
-
- (*----------------------------------------------------------------------}
- { library functions}
- {----------------------------------------------------------------------*)
-
- function RLEExpandBlock (theBlock: Ptr; outputBuf: DDPtr; blockLen: INTEGER): OSErr;
- function LZHExpandBlock (theBlock: Ptr; outputBuf: DDPtr; blockLen: INTEGER): OSErr;
-
- implementation
- end. {DartIntf}